const Router = require('koa-router');

const {tokenValidator} = require('../middleware/auth.middleware');
// const {gameFormValidator, idValidator} = require('../middleware/validate.middleware');
// 业务路由拆分 -- controller层
const {upload , getProfile, getLogInfo} = require('../controller/common.controller');

// 统一前缀
const router = new Router({prefix: '/common'});

// 文件上传
router.post('/upload', tokenValidator, upload);
router.get('/profile',getProfile);

// 获取日志
router.get('/log', tokenValidator, getLogInfo);



module.exports = router;